﻿@model ArticleWeb.Models.Article

@{
    ViewBag.Title = "编辑文章";
}

<link href="~/Content/css/wangEditor.min.css" rel="stylesheet" />
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>编辑文章</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.ID)

        <div class="form-group">
            <div class="col-md-10">
                @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "layui-input" } })
                @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
            </div>
        </div>
        <br />
        <div class="form-group">
            <div class="col-md-10">
                @Html.TextAreaFor(model => model.Content, new { @class = "form-control", style = "height: 600px;" })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>
        <br />
        <input type="submit" lay-submit lay-filter="edit" value="确定" class="layui-btn layui-btn-primary" />
        <a href="@Request["ReturnUrl"]" class="layui-btn layui-btn-primary">返回列表</a>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script src="~/Content/js/wangEditor.min.js"></script>
    <script>
        new wangEditor('Content').create();
    </script>
}
